import Toast from "../miniprogram_npm/@vant/weapp/toast/toast"

/**
 * 自定义的 toast提醒
 */
const toast = (type = "success",message ="成功",onClose =()=>{}) =>Toast({type,message,onClose})

/**
 * 成功的提醒消息
 */
const success = (message="成功",onClose=()=>{})=>toast('success',message,onClose)

/**
 * 失败的提醒消息
 */
const fail = (message = "成功",onClose=()=>{})=>toast('fail',message,onClose)

module.exports={
    toast,
    success,
    fail
}